'use strict';

const Controller = require('egg').Controller;

class BranchController extends Controller {
    async list() {
        const { ctx } = this
        // 查询数据库，获取科目列表
        const branch_list = await ctx.model.Branch.findAll({
            order: [
                ['order', 'ASC']
            ],
        });
        ctx.apiSuccess( branch_list, 'ok', 200 );
    }
}

module.exports = BranchController;
